<!DOCTYPE html>
<html>
<meta charset="UTF-8" />
<head>
<title>文件上传</title>
<script src="http://libs.baidu.com/jquery/1.10.1/jquery.min.js"></script>
<script src="/js/upload-common.js"></script>
<script src="/js/upload.js"></script>
<style type="text/css">
.progress {
	background: gray;
	width: 50%;
}

.progress-bar {
	background: green;
	width: 20%
}
</style>
</head>
<body>

	<hr />
	<div class="col-md-8 input-group">
		<input id="file" type="file" value="上传文件" />
	</div>


	<div class="progress" style="display:">
		<div id="progressBar" class="progress-bar">20%</div>
	</div>
	<button name="upload">上传</button>
	<button name="cancelUpload">取消</button>

	<label id="showSpeed"></label>
	<br />
	<label name="upfileName"></label>
	<br />
	<label name="upfileSize"></label>
	<br />
	<label name="upfileType"></label>
	<hr />
	<img id="testImage" alt="图片" height="200" width="400" src="#">
</body>
<script type="text/javascript">
	$(function() {
		$.get("/api/image", function(data) {
			$("#testImage").attr("src", data.image)
		})
	})
</script>

</html>